import request from '@/utils/request'
// 保存或者是编辑，通过传过来的表单有没有roleId字段来判断
export function saveGoods(data) {
  return request({
    url: data.id ? '/my/editGoods/' : '/my/addGoods/',
    method: 'POST',
    data
  })
}

export function getGoodsList(data) {
  return request({
    url: '/my/goodsList/',
    method: 'GET',
    data
  })
}

export function deleteGoods(data) {
  return request({
    url: '/my/deleteGoods/',
    method: 'POST',
    data
  })
}
